package com.intretech.umsin.oss.util.huaweiobs;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @version V1.0
 * @ClassName: HuaweiOssProperties
 * @Description: HuaweiOssProperties 服务实现
 * @author: 李启联
 * @date: 2022-04-25 16:18
 * @Copyright: Copyright (c) 2022
 */
@Component
@ConfigurationProperties(ignoreUnknownFields = true, prefix = "obs.oss")
public class HuaweiOssProperties {

    /**
     * 终端节点
     */
    private String endPoint;

    /**
     *存储桶
     */
    private String bucketName;

    /**
     * Access Key
     */
    private String ak;

    /**
     * Secret Key
     */
    private String sk;

    /**
     * 地区
     */
    private String bucketLoc;

    /**
     * 对象临时授权链接的过期时间(单位为秒)
     */
    private Long signedUrlExpires=3600L;

    /**
     * 工作目录,父目录
     */
    private String workDir = "";

    public Long getSignedUrlExpires() {
        return signedUrlExpires;
    }

    public void setSignedUrlExpires(Long signedUrlExpires) {
        this.signedUrlExpires = signedUrlExpires;
    }

    public String getWorkDir() {
        return workDir;
    }

    public void setWorkDir(String workDir) {
        this.workDir = workDir;
    }

    public HuaweiOssProperties() {
    }

    public String getEndPoint() {
        return endPoint;
    }

    public void setEndPoint(String endPoint) {
        this.endPoint = endPoint;
    }

    public String getBucketName() {
        return bucketName;
    }

    public void setBucketName(String bucketName) {
        this.bucketName = bucketName;
    }

    public String getAk() {
        return ak;
    }

    public void setAk(String ak) {
        this.ak = ak;
    }

    public String getSk() {
        return sk;
    }

    public void setSk(String sk) {
        this.sk = sk;
    }

    public String getBucketLoc() {
        return bucketLoc;
    }

    public void setBucketLoc(String bucketLoc) {
        this.bucketLoc = bucketLoc;
    }

    @Override
    public String toString() {
        return "HuaweiOssProperties{" +
                "endPoint='" + endPoint + '\'' +
                ", bucketName='" + bucketName + '\'' +
                ", ak='" + ak + '\'' +
                ", sk='" + sk + '\'' +
                ", bucketLoc='" + bucketLoc + '\'' +
                ", signedUrlExpires=" + signedUrlExpires +
                ", workDir='" + workDir + '\'' +
                '}';
    }
}
